File masks
File masks are patterns written by special rules.
PhoA uses file masks in a number of places: in search dialog, for
filtering the picture files being added, for describing the
tools etc.
- The program implements mask lists, delimited with a semicolon (;). The rules are described below. A
file matches masks if it matches any of the masks in the list (logical OR condition).
- A valid mask (each of the elements of the list delimited with ";") consists of optional
negation symbol, literal characters, sets, and wildcards.
- Negation symbol is an exclamation point (!), placed at the start of the mask. If it is present the
mask's meaning is inverted, ie matching files become non-matching and vice versa. Each mask in the list may have
or have no negation, each negation affects only the mask immediately following it.
- Each literal character must match a single character in the string.
- Each set begins with an opening bracket ([) and ends with a closing bracket (]). Between the
brackets are the elements of the set. Each element is a literal character or a range. Ranges are specified
by an initial value, a dash (-), and a final value. Do not use spaces or commas to separate the elements of
the set. A set must match a single character in the string. The character matches the set if it is the same as one
of the literal characters in the set, or if it is in one of the ranges in the set. A character is in a range if
it matches the initial value, the final value, or falls between the two values.
If the first character after the opening bracket of a set is an exclamation point (!), then the set matches
any character that is not in the set.
- Wildcards are question marks (?) or asterisks (*).
A question mark matches a single arbitrary character.
An asterisk matches any number of arbitrary characters.
NB:
- All character comparisons in masks are always case insensitive (ie there is no difference between
uppercase and lowercase letters).
- In places where it is allowed, an empty mask (a mask containing no characters) matches any
file.
- * - any file;
- *.* - any file having an extension;
- *.jpg - a file with any name and .jpg extension;
- vacation.* - a file named vacation and with any extension;
- [a-z]*.jpg - a file with the name starting with a letter and .jpg extension;
- [!a-z]* - a file with the name not starting with a letter
- *.jpg;*.gif;*.png;!temp* - all files having extension .jpg, .gif, .png, and also files with name not
starting with "temp".
See also:
Search
Tools
Copyright ©2002-2005 DK Software. All rights reserved.
|